package hn.cch.plugin.plugin.impl;

import hn.cch.plugin.entity.RecordEntity;
import hn.cch.plugin.plugin.RecordPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class RecordPluginServiceImpl implements RecordPlugin {

    private final static Logger logger = LoggerFactory.getLogger(RecordPluginServiceImpl.class);

    @Override
    public void updateRecord(RecordEntity recordEntity) {

        logger.info("amount:{}", recordEntity.getAmount());
    }

    @Override
    public boolean supports(RecordEntity recordEntity) {
        return recordEntity.isEnable();
    }
}
